package com.maixun.lib_comment.ui.dialog

import android.os.Bundle
import android.view.View
import com.maixun.lib_base.ui.dialog.BaseDialogImpl
import com.maixun.lib_base.utils.ScreenUtils
import com.maixun.lib_comment.R
import kotlinx.android.synthetic.main.comment_dialog_invalidation.view.*

/**
 * 作者：Lmoumou
 * 时间：2020/9/4 11:01
 */
class InvalidationDialog(private val onDismiss: () -> Unit) : BaseDialogImpl() {

    override fun getLayoutId(): Int = R.layout.comment_dialog_invalidation

    override fun getDialogWith(): Int {
        return (ScreenUtils.getScreenWidth(mContext) * 0.7).toInt()
    }

    override fun isCanBackKey(): Boolean = false

    override fun isCanBlank(): Boolean = false

    override fun initView(view: View, savedInstanceState: Bundle?) {
        view.tvSure.setOnClickListener {
            onDismiss()
            dismissThis(isResumed)
        }
    }
}